/**
 * 
 * 
 * 白问百答
 * */

import React from 'react';
import './style.less';
import CommonList from '@/component/common/CommonList/CommonList';
import { getQuestionList } from '@/network/protocol';
import { Link } from 'react-router-dom';

const QuestionView = (props) => {
  const { data } = props; 

  return <Link className="QA-list-item" to={"/questionDetail?id="+data.id}>
    <p className="QA-title">Q: <span>{data.question}</span></p>
    {/* <p>A: <span>{data.answer}</span></p> */}
  </Link>
}


const List = ({param, update }) => {

  return (
    <CommonList update={update} viewCmp={QuestionView} method={getQuestionList} param={param} />
  )
}


export default React.memo(List)